package com.example.graduate.response;

import com.example.graduate.env.ResponseCodeEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 登陆接口的响应码
 */
@Data
@AllArgsConstructor
public class DataResponse<T> {
    /**
     * 用户数据
     */
    private T data;

    /**
     * token 用于验证登陆以及防止幂提交
     */
    private String token;

    /**
     * 响应码
     */
    private String returnCode;

    public DataResponse(String returnCode) {
        this.returnCode = returnCode;
    }

    public DataResponse(String token,String returnCode){
        this.token = token;
        this.returnCode = returnCode;
    }
}
